<div class="row deploy-check">
  <p>
    <% if @deploy.job.executing? %>
      Deploy is running, refresh this page.
    <% elsif @deploy.job.queued? %>
      Deploy is queued and it will be started when previous deploys have finished.
    <% elsif JobQueue.enabled %>
      Deploy is pending but not queued or executing, so it will never start.
      Something went wrong during job creation, cancel it and try again.
    <% else %>
      Deploy is queued and will be started when Samson finishes restarting.
    <% end %>
  </p>

  <%= cancel_button deploy: @deploy, project: @project %>
</div>
